pub fn bubble_sort(v: &mut Vec<i32>) {
    let size = v.len();
    for i in 0..size {
        for j in 0..size - i - 1 {
            if v[j] > v[j + 1] {
                v.swap(j, j + 1);
            }
        }
    }
}

#[test]
fn bubble_sort_test() {
    let mut v = vec![1, 2, 5, 7, 2, 3];
    bubble_sort(&mut v);
    assert_eq!(v[2], 2);
}
